package com.pheruagor.handmanager.model.business {
	import mx.utils.StringUtil;

	/**
	 * All data concerning a person
	 */
	public class Person {
		// genetic hand
		public static const GENETIC_HAND_LEFT:String = "left";
		public static const GENETIC_HAND_RIGHT:String = "right";
		public static const GENETIC_HAND_BOTH:String = "both";
		// gender
		public static const MALE:String = "male";
		public static const FEMALE:String = "female";
		
		//-----------------------------------------------------
        // Properties
        //-----------------------------------------------------
        private var m_forname:String;
		private var m_lastname:String
		private var m_birthday:Date;
		private var m_size:Number;
		private var m_geneticHand:String;
		private var m_gender:String;
		
        //-----------------------------------------------------
        // Initialization
        //-----------------------------------------------------
		public function Person() {
		}
						
        //-----------------------------------------------------
        // Access
        //-----------------------------------------------------
		/**
		 * Player forname
		 */
		public function get forname():String {
			return m_forname;
		}
		
		/**
		 * @private
		 */
		public function set forname(value:String): void {
			m_forname = value;
		}
		
		/**
		 * Member lastname
		 */
		public function get lastname():String {
			return m_lastname;
		}
		
		/**
		 * @private
		 */
		public function set lastname(value:String): void {
			m_lastname = value;
		}

		/**
		 * Member birthday
		 */		
		public function get birthday():Date {
			return m_birthday;
		}
		
		/**
		 * @private
		 */
		public function set birthday(value:Date):void {
			m_birthday = value;
		}
		
		/**
		 * player size
		 */
		public function get size():Number {
			return m_size;
		}
		
		/**
		 * @private
		 */
		public function set size(value:Number):void {
			m_size = value;
		}
		
		/**
		 * Player geneticHand
		 */
		public function get geneticHand():String {
			return m_geneticHand;
		}
		
		/**
		 * private
		 */
		 [Inspectable(default='left', enumeration='left,right,both')]
		 public function set geneticHand(value:String):void {
		 	if (value != "left" && value != "right" && value != "both" && value != null){
		 		throw new ArgumentError(StringUtil.substitute("value {0} is not a valid argument", value));
		 	}
		 	m_geneticHand = value;
		 }
		
		/**
		 * Player gender
		 */
		public function get gender():String {
			return m_gender;
		}
		
		/**
		 * private
		 */
		 [Inspectable(default='male', enumeration='male,female' )]
		 public function set gender(value:String):void {
		 	m_gender = value;
		 }
		 
        //-----------------------------------------------------
        // Operation
        //-----------------------------------------------------
		  /* public function clone():Person {
		 	var result:Person = new Person();
		 	result.forname = forname;
		 	result.lastname = lastname;
		 	result.birthday = birthday;
		 	result.size = size;
		 	result.gender = gender;
		 	result.geneticHand = geneticHand;
		 	
		 	return result;
		 }  */

        //-----------------------------------------------------
        // Implementation
        //-----------------------------------------------------

		 
		/*  public function equals(person:Person): Boolean {
		 	
		 } */

	}
}